home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / util / rexx / rxasl.lha / rxasl / install < prev    next >
Text File  |  2000-11-07  |  3KB  |  119 lines

  1. ; $VER: RxASL_Install 2.0 (1.11.2000)
  2.  
  3. (procedure P_SetMessages
  4.  
  5.     (set #WhatInstallPromptMsg            "What do you want to install?")
  6.     (set #WhatInstallHelpMsg            "Choose what you want to install:\n    rxasl.library - RxASL core\n    Documentation - RxASL documentation in AmigaGuide format\n    Examples - RxASL ARexx macros")
  7.     (set #WhatInstallLibrariesMsg        "Library")
  8.     (set #WhatInstallDocumentationMsg    "Documentation")
  9.     (set #WhatInstallExamplesMsg        "Examples")
  10.  
  11.     (set #AskLibsDirPromptMsg            "Select the directory where you want to install rxasl.library")
  12.     (set #AskLibsDirHelpMsg                "In the directory you supply here, there will be installed rxasl.library . This drawer MUST BE in your LIBS: assignment")
  13.  
  14.     (set #AskGuideDirPromptMsg            "Select the directory where you want to install RxASL documentation in AmigaGuide format")
  15.     (set #AskGuideDirHelpMsg            "In the directory you supply here, there will be installed the RxASL documentation in AmigaGuide format")
  16.  
  17.     (set #AskExamplesDirPromptMsg        "Select the directory where you want to install RxASL examples macro")
  18.     (set #AskExamplesDirHelpMsg            "In the directory you supply here, there will be installed some RxASL examples ARexx macros")
  19.  
  20.     (set #CopyingLibsMsg                "Copying or Updating library")
  21.     (set #CopyingGuideMsg                "Copying documentation")
  22.     (set #CopyingExamplesMsg            "Copying examples")
  23. )
  24.  
  25. (procedure P_ChooseWhatIstall
  26.     (set #WhatInstall
  27.         (askoptions
  28.             (prompt #WhatInstallPromptMsg
  29.                 (help #WhatInstallHelpMsg)
  30.                 (choices #WhatInstallLibrariesMsg #WhatInstallDocumentationMsg    #WhatInstallExamplesMsg)
  31.                )
  32.           )
  33.      )
  34. )
  35.  
  36. (procedure P_AskLibsDir
  37.     (set #libsDir
  38.         (askdir
  39.                (prompt #AskLibsDirPromptMsg)
  40.                (help #AskLibsDirHelpMsg)
  41.                (default "LIBS:")
  42.           )
  43.      )
  44. )
  45.  
  46. (procedure P_AskGuideDir
  47.     (set #guideDir
  48.         (askdir
  49.            (prompt #AskGuideDirPromptMsg)
  50.            (help #AskGuideDirHelpMsg)
  51.            (default "Ram Disk:")
  52.         )
  53.      )
  54. )
  55.  
  56. (procedure P_AskExamplesDir
  57.     (set #examplesDir
  58.         (askdir
  59.             (prompt #AskExamplesDirPromptMsg)
  60.                (help #AskExamplesDirHelpMsg)
  61.                (default "Ram Disk:")
  62.           )
  63.      )
  64. )
  65.  
  66. (procedure P_CopyLibs
  67.     (working #CopyingLibsMsg)
  68.     (set #localLibsDir (tackon #source-dir "LIBS/"))
  69.     (foreach #localLibsDir "#?"
  70.           (copylib
  71.                (source (tackon #localLibsDir @each-name))
  72.                (dest #libsDir)
  73.           )
  74.      )
  75. )
  76.  
  77. (procedure P_CopyDocs
  78.     (working #CopyingGuideMsg)
  79.     (copyfiles
  80.         (source (tackon #source-dir "DOCS/english/"))
  81.           (dest #guideDir)
  82.           (optional force askuser)
  83.           (all)
  84.      )
  85. )
  86.  
  87. (procedure P_CopyExamples
  88.     (working #CopyingExamplesMsg)
  89.     (copyfiles
  90.         (source (tackon #source-dir "EXAMPLES/"))
  91.           (dest #examplesDir)
  92.           (optional force askuser)
  93.           (all)
  94.      )
  95. )
  96.  
  97. (set @default-dest "")
  98. (set #source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon)) (expandpath @icon)))
  99.  
  100. (P_SetMessages)
  101.  
  102. (complete 0)
  103.  
  104. (P_ChooseWhatIstall)
  105.  
  106. (if (= 0 #WhatInstall) (exit))
  107. (if (BITAND #WhatInstall 1)  (P_AskLibsDir))
  108. (if (BITAND #WhatInstall 2)  (P_AskGuideDir))
  109. (if (BITAND #WhatInstall 4)  (P_AskExamplesDir))
  110.  
  111. (if (BITAND #WhatInstall 1)  (P_CopyLibs))
  112. (complete 30)
  113.  
  114. (if (BITAND #WhatInstall 2)  (P_CopyDocs))
  115. (complete 80)
  116.  
  117. (if (BITAND #WhatInstall 4)  (P_CopyExamples))
  118. (complete 100)
  119.